package com.itcast.enum_type;


enum Sex2{
// 每一个枚举项都是枚举的对象
 GIRL("女孩"), BOY("男孩");
 private String name;
 private Sex2() {

    }
private Sex2(String name){
        this.name=name;

        }
public String getName(){
        return name;

        }
}

class Test3 {
    public static void main(String[] args){
    System.out.println(Sex2.GIRL.getName());
    System.out.println(Sex2.BOY.getName());

}
}